#include "tcpClient.hpp"
#include <memory>

using namespace client;
using namespace std;

// const std::string server_ip = "127.0.0.1";
// const uint16_t server_port = 8080;

static void Usage(string proc)
{
	cout << "\nUsage:\n\t" << proc << ": server_ip server_port\n\n";
}

int main(int argc, char *argv[])
{
	if (argc != 3)
	{
		Usage(argv[0]);
		exit(1);
	}
	string serverip = argv[1];
	uint16_t serverport = atoi(argv[2]);
    unique_ptr<TcpClient> tcli(new TcpClient(serverip, serverport));
    tcli->initClient();
    tcli->start();
    return 0;
}